﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BusinessGroupForm.aspx.cs"
    Inherits="FBKPI.Forms.BusinessGroupForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btn_save").click(function () {
                var param = "?";
                var isActive = 'false';

                $('#form1 td input:checked').each(function () {
                    var $cb = $(this);
                    if ($cb.attr('id') == 'chk_active') {
                        isActive = 'true';
                    }
                });

                param = param + "action=save";
                //param = param + "&ID=" + $("#txt_id").val();
                param = param + "&ID=" + $("#hfId").val();
                param = param + "&Description=" + $("#txt_description").val();
                param = param + "&isActive=" + isActive;
                param = param + "&CurrUser=" + $("#txt_user").val();
                ProcessRequest("BusinessGroupHandler.ashx" + param, "#divdetail", "#BusinessGroupTable");
                return false;
            });


//            $("#btn_delete").click(function () {
//                //                if (confirm('Are you sure to delete this record?')) {
//                //                    var param = "?";
//                //                    param = param + "action=delete";
//                //                    param = param + "&ID=" + $("#txt_id").val();
//                //                    param = param + "&CurrUser=" + $("#txt_user").val();
//                //                    ProcessRequest("BusinessGroupHandler.ashx" + param, "#divdetail", "#BusinessGroupTable");
//                //                    return false;
//                //                }

//                $.msgBox.confirm("Benar data akan dihapus ?", function () {
//                    var param = "?";
//                    param = param + "action=delete";
//                    param = param + "&ID=" + $("#txt_id").val();
//                    param = param + "&CurrUser=" + $("#txt_user").val();
//                    ProcessRequest("BusinessGroupHandler.ashx" + param, "#divdetail", "#BusinessGroupTable");
//                    return false;
//                }, false);
//                return false;
//            });

            $("#btn_close").click(function () {
                parent.$("#divdetail").dialog("close");
                return false;
            });
        });
    </script>
</head>
<link href="../Styles/button.css" rel="stylesheet" type="text/css" />
<body>
    <form id="form1" runat="server">
    <div id="businessgroupformarea" class="ui-widget-content padding5px ui-corner-all">
        <table class="dialogTable">
            <tr runat="server" visible="false">
                <td width="140px">
                    ID
                </td>
                <td class="Separator">
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_id" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Description
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_description" runat="server" class="longText mandatory"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    is Active
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:CheckBox ID="chk_active" Checked="true" runat="server" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <%-- <div id="AuditInformation" class="ui-widget-content padding5px ui-corner-all">
            <b style="margin-left:5px">Audit Information</b>
            <table class="dialogTable">
                <tr>
                    <td width="140px">Last Modified Date</td>
                    <td class="Separator">:</td>
                    <td><asp:TextBox ID="txt_lastmodifieddate" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Last Modified By</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_lastmodifiedby" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Create Date</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_createdate" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Create By</td>
                    <td>:</td>
                    <td><asp:TextBox ID="txt_createby" runat="server" ReadOnly="true"></asp:TextBox></td>
                </tr>
            </table>
        </div>--%>
    <br />
    <button id="btn_save" class="button save" runat="server" name="btnSave">
        Save
    </button>
   <%-- <button id="btn_delete" class="button delete"
        runat="server">
        Delete
    </button>--%>
     <button id="btn_close" class="button close"
        runat="server">
        Close
    </button>
    <asp:HiddenField ID="hfId" Value="0" runat="server" />
    </form>
</body>
</html>
